import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './registerServiceWorker'
import 'reset-css';
import elementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css';
import '@/assets/css/font-awesome.css'
Vue.use(elementUI)
import '@/utils/axios'
import '@/apis'
import '@/mixins/mixins'

Vue.config.productionTip = false

router.beforeEach((to,from,next)=>{
	if(to.path === '/Signin'){
		localStorage.clear()
		next();
	}else{
		if(localStorage.getItem('response')){
			next();
		}else{
			next({path:'/Signin',query:{redirect:to.path}})
		}
	}
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
